#ifndef _MAIN_H
#define _MAIN_H

#include "STC8G.h"
#include "intrins.h"

#include "uart.h"
#include "tim.h"
#include "robot.h"

#define C11 P25
#define C12 P34

#define C21 P26
#define C22 P24

#define C31 P27
#define C32 P36

#define C41 P32
#define C42 P20

#define C51 P33
#define C52 P21

#define C61 P37
#define C62 P22

#define LED1 P12
#define LED2 P13
#define LED3 P14
#define LED4 P16
#define LED5 P17

#define int8_t signed char
#define int16_t signed short int
#define int32_t signed long
#define uint8_t unsigned char
#define uint16_t unsigned short int
#define uint32_t unsigned long

#define u8  unsigned char
#define u16 unsigned short int
#define u32 unsigned long

extern uint16_t xdata task1;
extern uint16_t xdata task2;
extern uint16_t xdata task3;

void delay_ms(u16 ms);

//     /* exact-width signed integer types */
// typedef   signed          char int8_t;
// typedef   signed short     int int16_t;
// typedef   signed           long int32_t;
// typedef int bool ;

//     /* exact-width unsigned integer types */
// typedef unsigned          char uint8_t;
// typedef unsigned short     int uint16_t;
// typedef unsigned           long uint32_t;

#endif
